package com.ye.service.impl;

import com.ye.domain.User;
import com.ye.feign.UserFeign;
import com.ye.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserFeign userFeign;

    @Override
    public User login(String username, String password) {
        User user = userFeign.loginAuth(username, password);
        return user;
    }

    @Override
    public void register(User user) {
        userFeign.insertUser(user);
    }
}
